<?php
/*
 * name: cxm
 * desc: 题错误日志
 * date: 2020/08/11
 * */
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class CreateQuestionImportErrorLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('question_import_error_log', function (Blueprint $table) {
            $table->char('uuid',36)->primary();
            $table->string('lot')->comment('导入标识');
            $table->text('content')->comment('错误信息');
            $table->timestamps();
        });
        // 表注释
        DB::statement("ALTER TABLE `".config('database.connections.mysql.prefix')."question_import_error_log` comment'题导入错误日志'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('question_import_error_log');
    }
}
